<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景样式</title>
    <style>
        #d1{
            width: 200px;
            height: 100px;
            background-color: red;
        }
        #d2{
            width: 200px;
            height: 100px;
            background-image: url("../images/3.jpg");
        }
        /*#d3{*/
            /*width: 400px;*/
            /*height: 300px;*/
            /*background-color: #ff98fd;*/
            /*background-image: url("../images/heihei.gif");*/
            /*background-repeat: no-repeat;*/
            /*!*background-position: center;*!*/
            /*!*background-position: bottom right;*!*/
            /*!*background-position: 50%;*!*/
            /*background-position: 20% 20%;*/
        /*}*/
        #d3{
            width: 400px;
            height: 300px;
            background: #ff98fd url("../images/heihei.gif") no-repeat 20% 20%;
        }
        #d4{
            width: 2000px;
            height: 2000px;
            background-image: url("../images/33.jpg");
            background-attachment: fixed;
        }
    </style>
</head>
<body>
<div id="d4"></div>
<div id="d1"></div>
<div id="d2"></div>
<div id="d3"></div>
</body>
</html>